<?php

class GoodsUpgradeAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_STRING,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * @param $userId
     * @param $gridId
     * @param $girdLayer
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId, $gridId, $girdLayer)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_FLOWER_SHOP_SELL)) {
            return $this->buildResponse(false);
        }

        return $this->buildResponse(array(
            'info' => GoodsService::get()->upgradeFlowerStand($userId, $gridId, $girdLayer),
        ));
    }
}